//获取应用实例
var app = getApp();
Page({
    data: {
        isYueS:false,
        orderId:"",
        doc:"1、检验标志申请表（邮政速递人员上门揽收时提供）；\n2、行驶证正副本原件；\n3、交强险副本原件；\n4、车船税发票原件或免税证明原件（如交强险附带车船税购买的，只收交强险副本原件）\n",
    },
    onLoad: function () {
       var data =  app.getStorageSync(app.globalData.cacheOrderResKey);
        var isYueS = app.isYueS(data.carNumPrefix,data['address.cityId']);
        this.setData({
            orderId: data.orderId,
            carNumber: data.carNumber,
            isYueS:isYueS,
            doc:data.doc.split("\\n").join("\n")
        });
        app.setNavigationBarTitle(isYueS ? "提交成功" : "支付成功");
    },
    onHide:function () {
        app.removeStorageSync(app.globalData.cacheOrderResKey);
    },
    detailTap:function (e) {
        var orderId = e.target.dataset.id;
        app.redirectTo({
            url: '../orderdetail/orderdetail?orderId='+orderId
        });
    }
});
